package zorg.example.rest_demo.repo

import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.rest.core.annotation.RepositoryRestResource
import org.springframework.data.rest.core.annotation.RestResource
import zorg.example.rest_demo.entity.Student

@RepositoryRestResource(collectionResourceRel = "student", path = "student")
interface StudentRepository : JpaRepository<Student, Long> {

    @RestResource(exported = true)
    override fun getReferenceById(id: Long): Student
}